import { type ViewConfig, BaseView } from "@/context";
import { MapModule } from "../../modules/map";

export const externalModuleMap = {
    MapModule: { module: MapModule, initTime: "afterRender" as const }
};

export interface MapViewConfig extends ViewConfig {
    mapId: string;
}

export class MapView extends BaseView<
    typeof externalModuleMap,
    // typeof externalModuleMap,
    NonNullable<unknown>,
    MapViewConfig
> {
    protected _init() {
        return {
            componentMap: { loader: () => import("./MapContainer.vue") },
            internalModuleProtos: {},
            externalModuleProtos: externalModuleMap
        };
    }
}
